<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge，chrome=1">

    <title>个人信息</title>

    <link rel="stylesheet" href="/static/css-lib/bootstrap.min.css" />
    <link rel="stylesheet" href="/static/css-cus/fontawesome-all.css" />

    <style>
        .list-item {
            padding: 10px 15px;
            border-bottom: 1px solid #ddd;
            width: 100%;
        }
        .panel-box {
            padding: 0;
        }
        .text-span {
            display: inline-block;
            font-weight: bold;
        }
        .text-span-head {
            display: inline-block;
            width: 80px;
        }

        .aside-container{
            max-height: 100%;
            overflow-y: auto;
        }

        .aside-container::-webkit-scrollbar {
            /*滚动条整体样式*/
            width : 10px;  /*高宽分别对应横竖滚动条的尺寸*/
            height: 1px;
        }

        .aside-container::-webkit-scrollbar-thumb {
            /*滚动条里面小方块*/
            border-radius: 10px;
            box-shadow   : inset 0 0 5px rgba(73, 78, 84, 0.2);
            background   : #535353;
        }

        .aside-container::-webkit-scrollbar-track {
            /*滚动条里面轨道*/
            box-shadow   : inset 0 0 5px rgba(73, 78, 84, 0.2);
            border-radius: 10px;
            background   : #ededed;
        }
    </style>
</head>
<body class="aside-container">
    <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="#">个人信息</a>
            </div>
        </div>
    </nav>
    <div class="container-fluid" style="margin-top: 55px;">
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        基础信息
                    </div>
                    <div class="panel-body panel-box">
                        <div class="list-item">
                            <span class="text-span-head"><i class="fas fa-address-card"></i>&nbsp;&nbsp;姓名</span>
                            <span class="text-span">${StudentInfo.realName}</span>
                        </div>
                        <div class="list-item">
                            <span class="text-span-head"><i class="fas fa-venus-mars"></i>&nbsp;&nbsp;性别</span>
                            <span class="text-span">
                                <c:choose>
                                    <c:when test="${StudentInfo.sex == 0}">
                                        <c:out value="男" />
                                    </c:when>
                                    <c:otherwise>
                                        <c:out value="女" />
                                    </c:otherwise>
                                </c:choose>
                            </span>
                        </div>
                        <div class="list-item">
                            <span class="text-span-head"><i class="fas fa-school"></i>&nbsp;&nbsp;学校</span>
                            <span class="text-span">${StudentInfo.school}</span>
                        </div>
                        <div class="list-item">
                            <span class="text-span-head"><i class="fas fa-layer-group"></i>&nbsp;&nbsp;年级</span>
                            <span id="grade" class="text-span" style="margin-left: -10px;" data-id="<c:out value="${StudentInfo.grade}"/> "></span>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <button id="change-base" type="button" class="btn btn-default">修改</button>
                    </div>
                </div>
            </div>
            <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        登录信息
                    </div>
                    <div class="panel-body panel-box">
                        <div class="list-item">
                            <span class="text-span-head"><i class="fas fa-user"></i>&nbsp;&nbsp;用户名</span>
                            <span class="text-span">${StudentInfo.name}</span>
                        </div>
                        <div class="list-item">
                            <span class="text-span-head"><i class="fas fa-key"></i>&nbsp;&nbsp;密码</span>
                            <span class="text-span">*********</span>
                        </div>
                        <div class="list-item">
                            <span class="text-span-head"><i class="fas fa-mobile-alt"></i>&nbsp;&nbsp;手机</span>
                            <span class="text-span">${StudentInfo.phone}</span>
                        </div>
                        <div class="list-item">
                            <span class="text-span-head"><i class="fas fa-mail-bulk"></i>&nbsp;&nbsp;邮箱</span>
                            <span class="text-span">${StudentInfo.email}</span>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <button id="change-login" type="button" class="btn btn-default">修改</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        联系信息
                    </div>
                    <div class="panel-body panel-box">
                        <div class="list-item">
                            <span class="text-span-head"><i class="fab fa-qq"></i>&nbsp;&nbsp;QQ</span>
                            <span class="text-span">${StudentInfo.QQ}</span>
                        </div>
                        <div class="list-item">
                            <span class="text-span-head"><i class="fab fa-weixin"></i>&nbsp;&nbsp;微信</span>
                            <span class="text-span">${StudentInfo.weChat}</span>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <button id="change-connect" type="button" class="btn btn-default">修改</button>
                    </div>
                </div>
            </div>
            <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 grid-item">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        头像
                    </div>
                    <div class="panel-body panel-box">
                        <div class="list-item">
                            <c:choose>
                                <c:when test="${empty StudentInfo.avatar}">
                                    <img src="/static/images/user-default-avatar.png" alt="用户头像" class="user-avatar" />
                                </c:when>
                                <c:otherwise>
                                    <c:set var="teacherAvatar" value="/utils/imgDisplay?img=${StudentInfo.avatar}" scope="page" />
                                    <img src="<c:out value="${teacherAvatar}"/>" alt="用户头像" class="user-avatar" />
                                </c:otherwise>
                            </c:choose>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <button id="change-avatar" type="button" class="btn btn-default">修改</button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="/static/js-lib/jquery-3.4.1.min.js"></script>
    <script src="/static/js-cus/student/Frame-PersonalInfo.js"></script>
</body>
</html>